<div class="container-fluid posts-main">
    <div class="topBanner">
        <div class="topBannerBg">
            <img src="/imgs/welcome2.jpg" >
        </div>
        <div class="topBannerText">
            <span class="glyphicon glyphicon-tree-deciduous"></span>
            树洞<br>
            那些现实中未曾发出的声音，请把它留在这里。
        </div>
    </div>

	<div class="row">

        <ul id="postsList" class="col-md-7 col-md-offset-1">
            <h3 ng-if="hot"><span class="glyphicon glyphicon-fire"></span><span ng-bind="hot"></span>:</h3>

            <li ng-repeat="post in posts" post-single>
                <div class="post-content">
                    <!--如果不是匿名的则显示头像和昵称-->
                    <div ng-if="post.anonymous == 'false'" class="author">
                        <img src="{{ post.author.avatar }}" width="30" height="30" />
                        <a href="{{ post.author.name }}">
                            {{ post.author.name }}
                        </a>
                    </div>
                    <!--发表时间-->
                    <div class="post-time">
                        {{ post.time | date:'yyyy-MM-dd HH:mm:ss' }}
                    </div>

                    <!-- 经过格式转换的内容  -->
                    <span ng-bind-html='post.content | contentFilter'></span>
                    <div class="infos">
                        <div class="opta" ng-if="post.tags">
                            <span class="glyphicon glyphicon-tags"></span>
                            <span ng-repeat="tag in post.tags">
                                <a href="/tag/{{ tag }}" class="post-tag" ng-bind="tag">
                                </a>
                            </span>
                        </div>
                        <div class="optb">
                            <span class="like-button" ng-click="vote(post)">热度({{ post.good }})</span>
                            <span class="comment-button comments" ng-click="isCollapsed = !isCollapsed">评论({{ post.comments }})</span>
                        </div>
                    </div>
                </div>

                <div id="commentBox" collapse="isCollapsed">
                    <div class="shadow"></div>
                    <div class="up-arrow"></div>
                    <form class="comment-form">
                        <input type="text" name="content" ng-model="content" placeholder="评论" />
                        <input type="checkbox" name="inPrivate" ng-model="inPrivate"> <span title="只对你和他显示">秘密评论</span>
                        <input type="submit" class="comment" value="发 布" />
                    </form>

                    <ul class="comment-list">
                        <li ng-repeat="comment in comments">
                            <a href="{{ comment.userName }}">{{ comment.userName }}</a> :
                            {{ comment.content }}

                            <span class="comment-time">{{ comment.time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
                            <!--登录后有删除按钮-->
                            <a ng-if="name == comment.userName" href="javascript:;" deleteId="{{$index}}" class="deleteCommentButton">删除</a>
                        </li>
                    </ul>
                </div>
            </li>

            <div ng-if="posts[4]" class="loadMore text-center">
                <button class="btn btn-info btn-sm" ng-click="loadMore()">{{ loader }}</button>
            </div>
        </ul>

        <div class="col-md-3">
            <div class="announce">
                <div class="announce-header">
                   <span class="glyphicon glyphicon-cog"></span> &nbsp;系统公告
                </div>
                <div class="announce-body">
                    大家在使用过程中发现Bug的可以发送邮件到nuxio2015@163.com进行反馈！
                </div>
            </div>
            <div class="tags-box">
                <div class="tags-box-header">
                    <span class="glyphicon glyphicon-tags"></span> &nbsp;热门标签
                </div>
                <div class="tags-box-body">
                    <a href="/tag/{{ tag.tagName }}" ng-repeat="tag in tags">
                        #<span ng-bind="tag.tagName"></span>(<span ng-bind="tag.tagNumber"></span>)
                    </a>
                </div>
            </div>
        </div>
	</div>
</div>
